
let initNum = 0
export default function countReducers(preSatate = initNum, action) {
    let { type, data } = action
    switch (type) {
        case "add":
            return preSatate + data
        case "sub":
            return preSatate - data
        case "oddAdd":
            return preSatate + data
        case "jishuAdd":
            return preSatate + data
        case "ddAdd":
            return preSatate + data
        default:
            return preSatate
    }
}